<include file="Public:header" />
<div class="page-member subpage">
    <div class="form-header">
        <div>
            <div class="line1">
                <div class="fl"><h3>合同详情 / {$contact.no}</h3></div>
                <div class="fr hidden">
                    <form class="search-form" method="post" action="">
                        <input name="field" value="{$context.field}" type="hidden" />
                        <input name="value" value="{$context.value}" type="hidden" />
                        <input name="page" value="{$context.page}" type="hidden" />
                        <input name="order_field" value="{$context.order_field}" type="hidden" />
                        <input name="order_sort" value="{$context.order_sort}" type="hidden" />
                        <input name="offset" value="{$context.offset}" type="hidden" />
                        <input name="id" value="{$context.id}" type="hidden" />
                    </form>
                </div>
            </div>
            <div class="line2">
                <!-- 编辑按钮组 -->
                <div class="fl form-btn-group btn-group-edit">
                    <in name="$x|default='02-01-02'" value="$rightsCode">
                        <button onclick="action_edit();" class="btn-save btn-highlight">编 辑</button>
                        <else />
                        <button disabled="disabled" class="btn-save btn-disable">编 辑</button>
                    </in>
                    <span>或</span>
                    <a class="linkBtn btn-abort" href="/admin/contact/add">创建</a>
                </div>
                <!-- 保存按钮组 -->
                <div class="fl form-btn-group btn-group-save hidden">
                    <button onclick="action_save();" class="btn-save btn-highlight">保 存</button>
                    <span>或</span>
                    <a class="linkBtn btn-abort" onclick="action_abort();" href="javascript:void(0);">放弃</a>
                </div>
                <div class="fl form-btn-more">
                    <button class="btn-normal btn-more">
                        更多操作<i class="drop-down"></i>
                    </button>
                    <ul class="more-action hidden">
                        <in name="$x|default='02-01-02'" value="$rightsCode">
                            <li><a onclick="action_del2();" href="javascript:void(0);">删 除</a></li>
                        </in>
                    </ul>
                </div>
                <div class="fr form-search-count">
                    <span class="index">{$context.index}/{$page.total}</span>
                    <button onclick="ItemJump({$page.prev.id}, {$page.prev.offset});" class="btn-normal">上一条</button>
                    <button onclick="ItemJump({$page.next.id}, {$page.next.offset});" class="btn-normal">下一条</button>
                </div>
            </div>
        </div>
    </div>
    <div class="form-box2">
        <div>
            <form id="contactForm" method="post" action="">
                <!--表单相关原始信息存储-->
                <input type="hidden" name="old_yfdw" value="{$contact.yfdw}" />
                <input type="hidden" name="old_jfjbr" value="{$contact.jfjbr}" />
                <input type="hidden" name="old_yfsfz" value="{$contact.yfsfz}" />
                <input type="hidden" name="old_jffr" value="{$contact.jffr}" />
                <input type="hidden" name="old_ksrq" value="{$contact.ksrq}" />
                <input type="hidden" name="old_jsrq" value="{$contact.jsrq}" />
                <input type="hidden" name="old_yj" value="{$contact.yj}" />
                <input type="hidden" name="old_zj" value="{$contact.zj}" />
                <input type="hidden" name="old_total" value="{$contact.total}" />
                <input type="hidden" name="old_symj" value="{$contact.symj}" />
                <input type="hidden" name="old_jzmj" value="{$contact.jzmj}" />
                <input type="hidden" name="old_fwdz" value="{$contact.fwdz}" />
                <input type="hidden" name="old_state" value="{$contact.state}" />
                <input type="hidden" name="old_yfdz" value="{$contact.yfdz}" />
                <input type="hidden" name="old_jfdz" value="{$contact.jfdz}" />
                <input type="hidden" name="old_jfdh" value="{$contact.jfdh}" />
                <input type="hidden" name="old_yfdh" value="{$contact.yfdh}" />
                <input type="hidden" name="old_ctime" value="{$contact.ctime}" />
                <input type="hidden" name="old_remarks" value="{$contact.remarks}" />
                <table class="form">
                    <tr>
                        <th width="15%">合同编号<span class="hint">*</span></th>
                        <td width="35%" field="no">{$contact.no}</td>
                        <th width="15%">签订状态<span class="hint">*</span></th>
                        <td field="state">
                            <if condition="$contact[state] eq '已签订'">
                                <input name="state" checked="checked" disabled="disabled" value="已签订" type="checkbox" /><label>已签订</label>
                                <else />
                                <input name="state" disabled="disabled" value="已签订" type="checkbox" /><label>已签订</label>
                            </if>
                            <if condition="$contact[state] eq '未签订'">
                                <input name="state" checked="checked" disabled="disabled" value="未签订" type="checkbox" /><label>未签订</label>
                                <else />
                                <input name="state" disabled="disabled" value="未签订" type="checkbox" /><label>未签订</label>
                            </if>
                        </td>
                    </tr>
                    <tr>
                        <th>业务编号<span class="hint">*</span></th>
                        <td field="ywno">{$contact.ywno}</td>
                        <th>合同类型<span class="hint">*</span></th>
                        <td field="type">{$contact.type}</td>
                    </tr>
                    <tr>
                        <th>房源地址<span class="hint">*</span></th>
                        <td field="fwdz">{$contact.fwdz}</td>
                        <th>房源面积<span class="hint">*</span></th>
                        <td field="size">{$contact.size}</td>
                    </tr>
                    <tr>
                        <th>标准月租金(元)<span class="hint">*</span></th>
                        <td field="zj">{$contact.zj}</td>
                        <th>市场月租金(元)<span class="hint">*</span></th>
                        <td field="mzj">{$contact.mzj}</td>
                    </tr>
                    <tr>
                        <th>甲方<span class="hint">*</span></th>
                        <td field="jiafang">{$contact.jiafang}</td>
                        <th>乙方<span class="hint">*</span></th>
                        <td field="yifang">{$contact.yifang}</td>
                    </tr>
                    <tr>
                        <th>押金(元)<span class="hint">*</span></th>
                        <td>{$contact.yj}</td>
                        <th>低保人口<span class="hint">*</span></th>
                        <td>{$contact.dibaork}</td>
                    </tr>
                    <tr>
                        <th>减免类型<span class="hint">*</span></th>
                        <td>{$contact.derate_type}</td>
                        <th>减免金额(元)<span class="hint">*</span></th>
                        <td>{$contact.derate_money}</td>
                    </tr>
                    <tr>
                        <th>应缴租金<span class="hint">*</span></th>
                        <td>{$contact.total2}</td>
                        <th>减免后应缴租金<span class="hint">*</span></th>
                        <td>{$contact.total}</td>
                    </tr>
                    <tr>
                        <th>合同开始日期<span class="hint">*</span></th>
                        <td field="ksrq">{$contact.ksrq}</td>
                        <th>合同结束日期<span class="hint">*</span></th>
                        <td field="jsrq">{$contact.jsrq}</td>
                    </tr>
                    <tr>
                        <th>甲方法定代表人<span class="hint">*</span></th>
                        <td field="jffr">{$contact.jffr}</td>
                        <th>乙方身份证身份证<span class="hint">*</span></th>
                        <td field="yfsfz">{$contact.yfsfz}</td>
                    </tr>
                    <tr>
                        <th>甲方经办人<span class="hint">*</span></th>
                        <td field="jfjbr">{$contact.jfjbr}</td>
                        <th>乙方联系地址</th>
                        <td field="yfdz">{$contact.yfdz}</td>
                    </tr>
                    <tr>
                        <th>甲方联系电话<span class="hint">*</span></th>
                        <td field="jfdh">{$contact.jfdh}</td>
                        <th>乙方电话<span class="hint">*</span></th>
                        <td field="yfdh">{$contact.yfdh}</td>
                    </tr>
                    <tr style="vertical-align: top;">
                        <th>签订日期<span class="hint">*</span></th>
                        <td field="ctime">{$contact.ctime}</td>
                        <th>备注</th>
                        <td field="remarks">{$contact.remarks}</td>
                    </tr>
                </table>
            </form>
        </div>
    </div>
</div>
<script>
    $(document).ready(function(){
        $("input[name=state]").click(function(){
            if($(this).prop("checked")){
                $("input[name=state]").prop("checked", false);
                $(this).prop("checked", true);
            }
        });
    });
    /*** 全局变量 fields  // todo*/
    var fields = new Array("remarks");
</script>
<script src="__JS__/contact.js" type="text/javascript" ></script>
<include file="Public:footer" />
